#!/usr/bin/python3
import sys

try:
    t = int(input())
    if t < 1 or t > 10:
        sys.exit(0)
    for t1 in range(t):
        n = int(input())
        ns = [int(item) for item in input().split()]
        temp = {}
        for item in ns:
            if item in temp:
                temp[item] = 0
            else:
                temp[item] = 1
        result = sorted(temp.items(), key=lambda x: (-x[1]))
        print('Case #{}: {}'.format(t1 + 1, result[0][0]))

except ValueError:
    pass
except EOFError:
    pass
except MemoryError:
    pass
